from utils.handle_yaml import read_vars1
from utils.read_yaml import ReadYaml


# 扩展工具类，对yaml文件进行数据替换，都来源于这个类里面
class ExtendUtils:

    def read_vars(self, key):
        return read_vars1(key)

    def get_base_url(self, name):
        r_yaml = ReadYaml()
        host = r_yaml.get_value('reqConfig/host')
        return host

    def read_file(self, path):
        with open(path, "rb") as f:
            res = f.read()
        return res

    def jia_mi(self, info):
        pass
        # 进行加密处理
        # 返回加密后的信息


if __name__ == '__main__':
    print(ExtendUtils().get_base_url("uat1"))
